import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import postList from '../components/postList.vue'
import sendPost from '../components/sendPost.vue'
import Test from  '../views/Test.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    name:"首页",
    children:[
      {
        path:'postList',
        component:postList,
        name:"文章列表",
      },
      {
        path:'sendPost',
        component:sendPost,
        name:"发布文章",
      }
    ]
  },
  {
    path:'/login',
    component:Login
  },
  {
    path:'/Test',
    component:Test
  }
]

const router = new VueRouter({
  routes
})

export default router
